/**
 * Copyright (c) 2018-2028, HQY 胡庆一 (215218393@qq.com).
 * <p>
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/lgpl.html
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.ocm.product.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 实体类
 *
 * @author HQY
 * @since 2021-11-19
 */
@Data
@TableName("ocm_attr_value")
@ApiModel(value = "AttrValue对象", description = "AttrValue对象")
public class AttrValue {

    private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@JsonSerialize(using = ToStringSerializer.class)
  	private Long id;
    /**
     * 获取属性字段
     */
    @ApiModelProperty(value = "获取属性字段")
	@JsonSerialize(using = ToStringSerializer.class)
    private Long attrId;

  	private String attrValue;
    /**
     * 公共商品属性（sku共享属性）
     */
    @ApiModelProperty(value = "公共商品属性（sku共享属性）")
	@JsonSerialize(using = ToStringSerializer.class)
    private Long spuId=0L;
    /**
     * 销售商品属性（sku独有属性）
     */
    @ApiModelProperty(value = "销售商品属性（sku独有属性）")
	@JsonSerialize(using = ToStringSerializer.class)
    private Long skuId=0L;

    //1一般属性 0主属性
    private Integer valueRank=1;

	public AttrValue(Long attrId, String attrValue, Long spuId, Long skuId,Integer valueRank) {
		this.attrId = attrId;
		this.attrValue = attrValue;
		this.spuId = spuId;
		this.skuId = skuId;
		this.valueRank = valueRank;
	}


	public AttrValue() {
	}
}
